package cn.sdormitory.report.service.impl;

import cn.sdormitory.report.dao.DormitoryViolationsStaDao;
import cn.sdormitory.report.req.DormitoryViolationsStaReq;
import cn.sdormitory.report.service.DormitoryViolationsStaService;
import cn.sdormitory.report.vo.DormitoryViolationsStaVO;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author : yy
 * @date: 2025/4/12 15:56
 * @description:
 */
@Service
public class DormitoryViolationsStaServiceImpl implements DormitoryViolationsStaService {
    @Resource
    private DormitoryViolationsStaDao dormitoryViolationsStaDao;

    @Override
    public IPage<DormitoryViolationsStaVO> list(DormitoryViolationsStaReq dormitoryViolationsStaReq) {
        IPage<DormitoryViolationsStaVO> page =  new Page<>(dormitoryViolationsStaReq.getPageNum(), dormitoryViolationsStaReq.getPageSize());
        dormitoryViolationsStaDao.list(page, dormitoryViolationsStaReq);
        return page;
    }

    @Override
    public List<DormitoryViolationsStaVO> export(DormitoryViolationsStaReq dormitoryViolationsStaReq) {
        return dormitoryViolationsStaDao.export(dormitoryViolationsStaReq);
    }
}
